home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / mnt_201.zip / RBBSMNT.H < prev    next >
Text File  |  1992-01-05  |  11KB  |  181 lines

  1. /****************************************************************************/
  2. /* RBBSMNT.H for RBBSMNT v2.01, a maintenance utility for RBBS-PC           */
  3. /*╒═════════════════════════════ NOTICE ═══════════════════════════════════╕*/
  4. /*│  A limited license is granted to all users of this program to make     │*/
  5. /*│  copies if this program and distribute those copies to other users     │*/
  6. /*│  on the following three conditions:                                    │*/
  7. /*│                                                                        │*/
  8. /*│    1.   This notice is NOT altered, bypassed or removed,               │*/
  9. /*│    2.   The program is not to be distributed to others in modified     │*/
  10. /*│         form. You may make changes for your own non-commercial use     │*/
  11. /*│    3.   No fee is to be charged (or any other consideration received)  │*/
  12. /*│         for copying or distributing these programs without an express  │*/
  13. /*│         written agreement with J. Terpstra, Bamestra RBBS, PO Box 66,  │*/
  14. /*│         Beemster, The Netherlands.                                     │*/
  15. /*│                                                                        │*/
  16. /*│Copyright (C) 1991, 1992 - Jan Terpstra, Bamestra RBBS, The Netherlands.│*/
  17. /*╘════════════════════════════════════════════════════════════════════════╛*/
  18. /****************************************************************************/
  19.  
  20. #include <stdlib.h>
  21. #include <malloc.h>
  22. #include <time.h>
  23. #include <stdio.h>
  24. #include <conio.h>
  25. #include <string.h>
  26. #include <ctype.h>
  27. #include <sys\types.h>
  28. #include <sys\stat.h>
  29. #include <io.h>
  30. #include <fcntl.h>
  31.  
  32.   /**************************************************************************/
  33.   /* define data                                                            */
  34.   /**************************************************************************/
  35.  
  36. #define  PRGNAME       "RBBSMNT "
  37. #define  VERSION       "v2.01"
  38. #define  RELDATE       " of Januari 5, 1992 "
  39. #define  OK            0
  40. #define  ERROR         -1
  41. #define  TRUE          1
  42. #define  FALSE         0
  43. #define  ALIVE         "\xE1"           /* active RBBS message              */
  44. #define  TXTLEN        256              /* size of text buffers             */
  45. #define  UBLOCK        256              /* # of in-core user records        */
  46.  
  47.   /**************************************************************************/
  48.   /* structure to save msg info                                             */
  49.   /**************************************************************************/
  50.  
  51. typedef struct
  52. {
  53.    int old_num;                         /* msg number before renum          */
  54.    int new_num;                         /* msg number after renum           */
  55.    int num_recs;                        /* number of record in this message */
  56.    int msg_age;                         /* age of this msg                  */
  57.    long msg_pos;                        /* position of this MSG in the file */
  58.    char far *buf;                       /* pointer to in-memory msg buffer  */
  59. } MSGINFO,*MSGINFO_PTR;
  60.  
  61.   /**************************************************************************/
  62.   /* RBBS-PC messagefile header record structure (1st record of msg file)   */
  63.   /**************************************************************************/
  64.  
  65. typedef struct
  66. {
  67.    char last_msg[8];                    /* ASCII number of last msg         */
  68.    int joinsec;                         /* min level to join this conference*/
  69.    char cur_caller[10];                 /* ASCII number of current caller   */
  70.    char rsvd1[36];                      /* reserved                         */
  71.    char user_count[5];                  /* # of entries in USERS file       */
  72.    char spare[6];                       /* unused                           */
  73.    char first_msg_rec[7];               /* # of first actual message record */
  74.    char next_free_rec[7];               /* # of first available free record */
  75.    char last_msg_rec[7];                /* # of records in this file        */
  76.    char max_message[7];                 /* # of max messages in this file   */
  77.    char rsvd3[31];                      /* reserved                         */
  78.    char num_nodes[2];                   /* # of nodes using this file       */
  79. } RBBSHDR,*RBBSHDR_PTR;
  80.  
  81.   /**************************************************************************/
  82.   /* structure of a "node" record in the messages file                      */
  83.   /**************************************************************************/
  84.  
  85. typedef struct
  86. {
  87.    char last_user[31];                  /* name of last user on this node   */
  88.    int sysop_avail;                     /* sysop available indicator        */
  89.    int sysop_annoy;                     /* sysop pagable indicator          */
  90.    int sysop_next;                      /* if sysop wants system nect       */
  91.    int printer_on;                      /* this node logs to printer        */
  92.    int door_avail;                      /* indicates if DOORS are open      */
  93.    int eight_bit;                       /* user logged on N,8,1             */
  94.    char baud_rate[2];                   /* baudrate indicator               */
  95.    int upper_case;                      /* user wants all UPPER case        */
  96.    long bytes_xferd;                    /* bytes xferd in last up/down load */
  97.    char batch_xfer[1];                  /* user can do batch transfer       */
  98.    int graphics;                        /* user wants graphics and/or color */
  99.    int sysop;                           /* if current user is SYSOP         */
  100.    char active[1];                      /* this node has a user on-line now */
  101.    int snoop;                           /* snoop for this node is on        */
  102.    char modem_baud[5];                  /* modem to computer baudrate       */
  103.    char logon_time[3];                  /* time user logged on (packed)     */
  104.    char rsvd1[4];                       /* reserved                         */
  105.    int priv_door;                       /* returning from private door      */
  106.    char door_type[1];                   /* what external program was called */
  107.    char protocol[1];                    /* current protocol used            */
  108.    char rsvd2[1];                       /* reserved                         */
  109.    int last_exit;                       /* last date RBBS-PC exited (packed)*/
  110.    char rsvd3[7];                       /* reserved                         */
  111.    char exit_time[5];                   /* last time RBBS-PC exited         */
  112.    int arq;                             /* MNP/ARQ indicator                */
  113.    char pui[8];                         /* PUI name                         */
  114.    int local;                           /* local indicator                  */
  115.    int local_port;                      /* no com port indicator            */
  116.    char confername[8];                  /* name of current conference       */
  117.    int time_credit;                     /* UL time credit                   */
  118.    int rsvd4;                           /* reserved                         */
  119.    int lastmenu;                        /* last menu user was in            */
  120.    char ext_date[6];                    /* date (MMDDYY) of exit to protocol*/
  121.    char ext_time[4];                    /* time (HHMM) of exit to protocol  */
  122. } RBBSNODE,*RBBSNODE_PTR;
  123.  
  124.   /**************************************************************************/
  125.   /* structure of a RBBS-PC message header                                  */
  126.   /**************************************************************************/
  127.  
  128. typedef struct
  129. {
  130.    char private[1];                     /* contains * for private msg       */
  131.    char msg_number[4];                  /* ASCII msg number                 */
  132.    char msg_from[31];                   /* msg from                         */
  133.    char msg_to[22];                     /* msg to                           */
  134.    char enter_time[8];                  /* time msg was written             */
  135.    char rsvd1[1];                       /* reserved                         */
  136.    char enter_date[8];                  /* date msg was written             */
  137.    char msg_subj[25];                   /* msg subject                      */
  138.    char msg_pswd[15];                   /* password to read msg             */
  139.    char msg_stat[1];                    /* active/killed msg                */
  140.    char num_recs[4];                    /* # of record in this msg          */
  141.    int msg_secy;                        /* msg security                     */
  142.    char last_date[3];                   /* last date msg was read (packed)  */
  143.    char last_time[3];                   /* last time msg was read (packed)  */
  144. } RBBSMSG,*RBBSMSG_PTR;
  145.  
  146.   /**************************************************************************/
  147.   /* structure of the RBBS users file records                               */
  148.   /**************************************************************************/
  149.  
  150. typedef struct
  151. {
  152.    char user_name[31];                  /* user name (first & last)         */
  153.    char password[15];                   /* user password                    */
  154.    int user_level;                      /* user security level              */
  155.    int times_on;                        /* times user has logged on         */
  156.    int lastread;                        /* last msg read                    */
  157.    char user_proto[1];                  /* user preferred protocol          */
  158.    char graphics[1];                    /* user graphic preferences         */
  159.    int margin;                          /* user msg margin                  */
  160.    int user_options;                    /* user options                     */
  161.    int subscribe;                       /* user registration date (packed)  */
  162.    char pagelength[1];                  /* user pagelength                  */
  163.    char rsvd1[1];                       /* reserved                         */
  164.    char user_city[24];                  /* user city/state                  */
  165.    char rsvd2[3];                       /* reserved                         */
  166.    long files_today;                    /* files downloaded today           */
  167.    long bytes_today;                    /* bytes downloaded today           */
  168.    long bytes_down;                     /* bytes downloaded TOTAL           */
  169.    long bytes_up;                       /* bytes uploaded TOTAL             */
  170.    char last_on[14];                    /* last dat/time user logged on     */
  171.    char last_list[3];                   /* date last listed files (packed)  */
  172.    int down_files;                      /* files downloaded TOTAL           */
  173.    int up_files;                        /* files uploaded TOTAL             */
  174.    int elapsed;                         /* elapsed time during last call    */
  175. } RBBSUSER,*RBBSUSER_PTR;
  176.  
  177. #include "prototype.h"                  /* fuction prototypes               */
  178.  
  179. /*--------------------------------------------------------------------------*/
  180.  
  181.